package com.cxhc.common.enums;

public enum RepairType {

    RUBBISH("垃圾分类", 5L),
    EPIDEMIC_SITUATION("疫情防控",2L),
    ILLEGAL_PARKING("违章停车",2L),
    TRAFFIC_ISSUES("交通问题",5L),
    OTHER("其它问题",10L),
    CONTRADICTION("群众矛盾/纠纷",5L),
    COMMENDATION("表扬表彰",2L),
    ENVIRONMENTAL_SANITATION("环境卫生问题",5L),
    ATTRACT_INVESTMENT("招商引资",10L),
    TALENT("人才",10L),
    FEEDBACK("意见反馈",10L),
    FIRE_SAFETY("消防安全",10L),
    GREENING("绿化园林",5L),
    EQUIPMENT("设施设备",5L);

    private final String type;
    private final Long integral;

    RepairType(String type ,Long integral) {
        this.type = type;
        this.integral = integral;
    }

    public static RepairType byType(String type) {
        for (RepairType value : values()) {
            if (value.type.equals(type)){
                return value;
            }
        }
        return OTHER;
    }

    public String getType() {
        return type;
    }


    public Long getIntegral() {
        return integral;
    }


    @Override
    public String toString() {
        return "IntegralType{" +
                "type='" + type + '\'' +
                ", integral='" + integral + '\'' +
                '}';
    }
}
